<!--#include file="./doctype.html"-->
<title><%=editTitle%>留言-<%=siteTitle%>-后台管理</title>
</head><body>
<div class="wrap">
	<ol class="breadcrumb">
		<li><a href="<%=fileName%>?q=index">列表首页</a></li>
		<li class="active"><a href="javascript:;" class="reload">
		    <%=editTitle%>
		    <% if app.int(data(14)) > 0 then %> 回复<%end if%>
		</a></li>
	</ol>
	<div class="alert alert-success">
		<span class="close" data-dismiss="alert">&times;</span>
		简介内容分页标签为：[page]，注意小写
	</div>
	<form method="post" action="<%=fileName%>?q=save" class="mb10" role="form">
        <input type="hidden" name="id" value="<%=iid%>">
        <input type="hidden" name="replyID" value="<%=app.int(data(14))%>">
        <div class="form-group dn">
            <label class="inline control-label" for="genreID">大类选择</label>
            <div class="inline w20 genre_id" data-name="genreID" data-id="2"></div>
        </div>
        <div class="form-group fix">
            <input id="title" name="title" class="form-control inline w30 check_value clean" placeholder="留言标题" value="<%=app.hec(data(0))%>" />
            <label class="inline control-label" for="title">留言标题</label>
        </div>
        <div class="form-group fix">
            <input id="userName" name="userName" class="form-control inline w30 check_value clean" placeholder="作者" value="<%=app.hec(data(1))%>" />
            <label class="inline control-label" for="userName">留言者</label>
        </div>
        <div class="form-group fix">
            <input id="userIP" name="userIP" class="form-control inline w30 clean" placeholder="IP" value="<%=app.hec(data(2))%>" />
            <label class="inline control-label" for="userIP">IP</label>
        </div>
        <div class="form-group fix">
            <input id="userAddr" name="userAddr" class="form-control inline w30 clean" placeholder="归属地" value="<%=app.hec(data(3))%>" />
            <label class="inline control-label" for="userAddr">归属地</label>
        </div>
        <div class="form-group fix">
            <input id="editCode" name="editCode" class="form-control inline w30 clean" placeholder="修改留言的验证码" value="<%=data(4)%>" />
            <label class="inline control-label" for="editCode">修改留言的验证码(只能为8位以内的数字)(0则不可修改)</label>
        </div>
        <div class="form-group fix">
            <input id="userEmail" name="userEmail" class="form-control inline w30 clean" placeholder="email邮件" value="<%=data(5)%>" />
            <label class="inline control-label" for="userEmail">email邮件</label>
        </div>
        <div class="form-group fix">
            <input id="reAdmin" name="reAdmin" class="form-control inline w30 clean" placeholder="管理员ID" value="<%=data(6)%>" />
            <label class="inline control-label" for="reAdmin">管理员ID(如果是0则伪造留言)</label>
        </div>
        <div class="form-group fix">
            <input id="hits" name="hits" class="form-control inline w30 clean" placeholder="点击数" value="<%=data(7)%>" />
            <label class="inline control-label" for="hits">点击数</label>
        </div>
        <div class="form-group fix">
            <input id="dateTime" name="dateTime" class="form-control inline w30 clean data_time" placeholder="时间" value="<%=app.cj_date(data(8))%>" />
            <label class="inline control-label" for="dateTime">时间</label>
        </div>
        <div class="form-group fix">
            <div class="inline w30 class_id" data-name="classID" data-id="<%=data(12)%>"></div>
            <label class="inline control-label" for="classID">所属栏目</label>
        </div>
        <div class="form-group fix">
             <label class="btn btn-sm btn-default control-label">
                 <input name="isTop" value="<%=data(9)%>" type="checkbox"
                 <% if app.cj_bool(data(9)) then %>checked="checked"<% End if %>
                 > 是否置顶？
             </label>
             <label class="btn btn-sm btn-default control-label">
                 <input name="auditing" value="<%=data(10)%>" type="checkbox"
                 <% if app.cj_bool(data(10)) then %>checked="checked"<% End if %>
                 > 是否审核？
             </label>
             <label class="btn btn-sm btn-default control-label">
                 <input name="isShow" value="<%=data(11)%>" type="checkbox"
                 <% if app.cj_bool(data(11)) then %>checked="checked"<% End if %>
                 > 是否公开？
             </label>
        </div>
        <div class="form-group fix">
            <label class="inline control-label" for="content">留言内容</label>
            <textarea id="content" name="content" class="form-control check_value" rows="10" placeholder="内容"><%=admin.deUploadDir(data(13))%></textarea>
        </div>
        <div class="form-group fix text-center submit_box"></div>
	</form>
    <!--#include file="loadeditor.html"-->
    <!--#include file="loadTime.html"-->
</div>
<script>
$(document).ready(function() {
    var getData = function(id) {
        var gid = id || $('#genreID').val();
        $('.class_id').getKind({
            url: './ajax.asp?q=getGenreClass',
            data:'id='+gid,
            type: 'select'
        });
    };
    $('.genre_id').getKind({
        url: './ajax.asp?q=getGenreType',
        data:'id=2',
        type: 'select',
        callback: function(a) {
            getData($(this).find('select').val())
        }
    });
	$('.check_value').checkEmpty();
	$('.data_time').datePicker().on('changeDate', function(e){
	    e.viewMode == 'days' && $(this).datePicker('hide');
	});
$(this)
    .on('change', '.genre_id select', function() {
        getData($(this).val());
    })
	.on('submit', 'form', function(){
		return $.submitForm('.check_value');
	})
})
</script>
</body>
</html>